CREATE TABLE [dbo].[TTINDI_ACTU]
(
[CO_MONE] [dbo].[TD_VC_003] NOT NULL,
[NU_ANNO] [dbo].[TD_IN_004_ANOS] NOT NULL CONSTRAINT [DF__TTINDI_AC__NU_AN__5B438874] DEFAULT (datepart(year,getdate())),
[NU_MESE] [dbo].[TD_IN_002_MESE] NOT NULL,
[IN_ACTU] [dbo].[TD_NU_009_004] NOT NULL CONSTRAINT [DF__TTINDI_AC__IN_AC__5E1FF51F] DEFAULT ((0)),
[IN_FECH_VIGE] [dbo].[TD_DT_001] NOT NULL,
[FA_AJUS] [dbo].[TD_NU_016_004] NOT NULL CONSTRAINT [DF__TTINDI_AC__FA_AJ__5F141958] DEFAULT ((0)),
[CO_USUA_CREA] [dbo].[TD_VC_008_USUA] NULL CONSTRAINT [DF__TTINDI_AC__CO_US__60083D91] DEFAULT (substring(suser_sname(),(1),(8))),
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NULL CONSTRAINT [DF__TTINDI_AC__FE_US__60FC61CA] DEFAULT (getdate()),
[CO_USUA_MODI] [dbo].[TD_VC_008_USUA] NULL CONSTRAINT [DF__TTINDI_AC__CO_US__61F08603] DEFAULT (substring(suser_sname(),(1),(8))),
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NULL CONSTRAINT [DF__TTINDI_AC__FE_US__62E4AA3C] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TTINDI_ACTU] WITH NOCHECK ADD CONSTRAINT [CK__TTINDI_AC__NU_AN__5C37ACAD] CHECK NOT FOR REPLICATION (([NU_ANNO]>(1850)))
GO
ALTER TABLE [dbo].[TTINDI_ACTU] WITH NOCHECK ADD CONSTRAINT [CK__TTINDI_AC__NU_ME__5D2BD0E6] CHECK NOT FOR REPLICATION (([NU_MESE]>=(0) AND [NU_MESE]<=(13)))
GO
ALTER TABLE [dbo].[TTINDI_ACTU] ADD CONSTRAINT [PK__TTINDI_A__ED1E31C76462DE5A] PRIMARY KEY CLUSTERED  ([CO_MONE], [NU_ANNO], [NU_MESE]) ON [PRIMARY]
GO
GRANT SELECT ON  [dbo].[TTINDI_ACTU] TO [public]
GRANT INSERT ON  [dbo].[TTINDI_ACTU] TO [public]
GRANT DELETE ON  [dbo].[TTINDI_ACTU] TO [public]
GRANT UPDATE ON  [dbo].[TTINDI_ACTU] TO [public]
GO
